<?php
namespace App\Http\Controllers\Admin;

use App\Http\Controllers\AdminController as Controller;
use Crypt;
use Illuminate\Http\Request;
use App\Model\User;
use App\Model\{Admin,Config};
use Illuminate\Support\Facades\DB;

/**
 * @menu_cat 日志
 * @icon asterisk
 */
class LogController extends Controller
{
	
	public function __invoke(){
        return $this->index(func_get_args());
    }
	
	/**
	 * @menu 错误日志
	 * @return [type] [description]
	 */
	public function error_log(){
		$list = DB::table('error_log');
		$this->_search($list, $search);
        $total = $list->count();
        $this->_order($list, ['id'=>'desc']);
        $list = $list->paginate(20);
        return view('Admin.Log.error_log')->with([
            'list' => $list,
            '_search'=>$search,
        ]);
	}

	/**
	 * @menu laravel后台队列日志
	 * @return [type] [description]
	 */
	public function songsu_queue_log(){
		$list = DB::table('songsu_queue_log');
		$this->_search($list, $search);
        $total = $list->count();
        $this->_order($list, ['id'=>'desc']);
        $list = $list->paginate(20);
        return view('Admin.Log.songsu_queue_log')->with([
            'list' => $list,
            '_search'=>$search,
            'work_type'=>Config::get_config_bykey('songsu_queue_log_work_type')
        ]);
	}
}